﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoobarFootball.Models.Utility;

namespace FoobarFootball.Models
{
    /// <summary>
    /// A Player object
    /// </summary>
    public partial class Player
    {
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public CardRarity Rarity { get; set; }
        public Uri Photo { get; set; }
        public Formation Formation { get; set; }
        public PlayerPosition Position { get; set; }
        public string Nation { get; set; }
        public int Attack { get; set; }
        public int Defence { get; set; }
        public int Contract { get; set; }
        public int Morale { get; set; }
        public int Fitness { get; set; }
        // TODO: Refactor to an injury
        public int InjuredLength { get; set; }
        public int Goals { get; set; }
        public int Apperances { get; set; }
        public int Behaviour { get; set; }
        public int Suspensions { get; set; }
        public int IsAvailable { get; set; }

        public Position CurrentPosition { get; set; }
        public Position FuturePosition { get; set; }

        public void MovePlayer(Position from, Position to)
        {
            int cost = Maths.CalculateDistance(from, to);

            // reduce stamina

            // change current position
            this.CurrentPosition = to;
        }
    }
}
